package com.rombo.hiberdemo.po;

import javax.persistence.*;

/**
 * Create by Yet on 2016/12/7
 **/
@Entity
@Table(name = "orga", schema = "db_test", catalog = "")
public class OrgaPO {
    private String uuid;
    private String parid;
    private String fname;
    private String sname;
    private String type;
    private String yxbz;
    private String sorts;

    @Id
    @Column(name = "UUID")
    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    @Basic
    @Column(name = "PARID")
    public String getParid() {
        return parid;
    }

    public void setParid(String parid) {
        this.parid = parid;
    }

    @Basic
    @Column(name = "FNAME")
    public String getFname() {
        return fname;
    }

    public void setFname(String fname) {
        this.fname = fname;
    }

    @Basic
    @Column(name = "SNAME")
    public String getSname() {
        return sname;
    }

    public void setSname(String sname) {
        this.sname = sname;
    }

    @Basic
    @Column(name = "TYPE")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Basic
    @Column(name = "YXBZ")
    public String getYxbz() {
        return yxbz;
    }

    public void setYxbz(String yxbz) {
        this.yxbz = yxbz;
    }

    @Basic
    @Column(name = "SORTS")
    public String getSorts() {
        return sorts;
    }

    public void setSorts(String sorts) {
        this.sorts = sorts;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        OrgaPO orgaPO = (OrgaPO) o;

        if (uuid != null ? !uuid.equals(orgaPO.uuid) : orgaPO.uuid != null) return false;
        if (parid != null ? !parid.equals(orgaPO.parid) : orgaPO.parid != null) return false;
        if (fname != null ? !fname.equals(orgaPO.fname) : orgaPO.fname != null) return false;
        if (sname != null ? !sname.equals(orgaPO.sname) : orgaPO.sname != null) return false;
        if (type != null ? !type.equals(orgaPO.type) : orgaPO.type != null) return false;
        if (yxbz != null ? !yxbz.equals(orgaPO.yxbz) : orgaPO.yxbz != null) return false;
        if (sorts != null ? !sorts.equals(orgaPO.sorts) : orgaPO.sorts != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = uuid != null ? uuid.hashCode() : 0;
        result = 31 * result + (parid != null ? parid.hashCode() : 0);
        result = 31 * result + (fname != null ? fname.hashCode() : 0);
        result = 31 * result + (sname != null ? sname.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (yxbz != null ? yxbz.hashCode() : 0);
        result = 31 * result + (sorts != null ? sorts.hashCode() : 0);
        return result;
    }
}